package cn.edu.neusoft.neufooddemo.model;

import cn.edu.neusoft.neufooddemo.common.Constants;
import cn.edu.neusoft.neufooddemo.listener.RetrofitListener;
import cn.edu.neusoft.neufooddemo.service.ShopService;
import retrofit2.Call;

/**
 * Created by Shinelon on 2017/4/10.
 */

public class ShopModel extends RetrofitBaseModel {
    private ShopService shopService;
    public ShopModel()
    {
        this.shopService = retrofit.create(ShopService.class);
    }
    public void getAllShops(final RetrofitListener listener) {
        Call call = shopService.getAllShops();
        bindCallback(call,listener,Constants.GETALLSHOPS);
    }

    public void getShopById(String shop_id,RetrofitListener listener) {
        Call call = shopService.getShopById(shop_id);
        bindCallback(call,listener,Constants.GETSHOPBYID);
    }
}
